package net.destroyer.game.tetris.core.util;

import java.awt.Color;

import javax.media.j3d.GeometryArray;
import javax.media.j3d.LineArray;
import javax.media.j3d.Shape3D;
import javax.vecmath.Color3f;
import javax.vecmath.Point3f;

public class Origin extends Shape3D {
	public Origin() {
		LineArray ar = new LineArray(6, GeometryArray.COORDINATES | GeometryArray.COLOR_3);
		Point3f o = new Point3f(0,0,0);
		Point3f x = new Point3f(0.5f,0,0);
		Point3f y = new Point3f(0,0.5f,0);
		Point3f z = new Point3f(0,0,0.5f);
		Color3f red = new Color3f(Color.RED);
		Color3f green = new Color3f(Color.GREEN);
		Color3f blue = new Color3f(Color.BLUE);
		
		ar.setCoordinate(0, o);
		ar.setCoordinate(1, x);
		ar.setCoordinate(2, o);
		ar.setCoordinate(3, y);
		ar.setCoordinate(4, o);
		ar.setCoordinate(5, z);
		
		ar.setColor(0, red);
		ar.setColor(1, red);
		ar.setColor(2, green);
		ar.setColor(3, green);
		ar.setColor(4, blue);
		ar.setColor(5, blue);
		
		this.setGeometry(ar);
	}
}
